Optimal. Leaf size=35 \[ -\frac {\log (\cos (c+d x))}{a d}-\frac {\log (a+b \sec (c+d x))}{a d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {3970, 36, 29,
31} \begin {gather*} -\frac {\log (a+b \sec (c+d x))}{a d}-\frac {\log (\cos (c+d x))}{a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 31
Rule 36
Rule 3970
Rubi steps
\begin {align*} \int \frac {\tan (c+d x)}{a+b \sec (c+d x)} \, dx &=\frac {\text {Subst}\left (\int \frac {1}{x (a+x)} \, dx,x,b \sec (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \frac {1}{x} \, dx,x,b \sec (c+d x)\right )}{a d}-\frac {\text {Subst}\left (\int \frac {1}{a+x} \, dx,x,b \sec (c+d x)\right )}{a d}\\ &=-\frac {\log (\cos (c+d x))}{a d}-\frac {\log (a+b \sec (c+d x))}{a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 19, normalized size = 0.54 \begin {gather*} -\frac {\log (b+a \cos (c+d x))}{a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.04, size = 33, normalized size = 0.94
method | result | size |
derivativedivides | \(\frac {-\frac {\ln \left (a +b \sec \left (d x +c \right )\right )}{a}+\frac {\ln \left (\sec \left (d x +c \right )\right )}{a}}{d}\) | \(33\) |
default | \(\frac {-\frac {\ln \left (a +b \sec \left (d x +c \right )\right )}{a}+\frac {\ln \left (\sec \left (d x +c \right )\right )}{a}}{d}\) | \(33\) |
risch | \(\frac {i x}{a}+\frac {2 i c}{a d}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 b \,{\mathrm e}^{i \left (d x +c \right )}}{a}+1\right )}{a d}\) | \(54\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 19, normalized size = 0.54 \begin {gather*} -\frac {\log \left (a \cos \left (d x + c\right ) + b\right )}{a d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.34, size = 19, normalized size = 0.54 \begin {gather*} -\frac {\log \left (a \cos \left (d x + c\right ) + b\right )}{a d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 82 vs.
\(2 (27) = 54\).
time = 3.39, size = 82, normalized size = 2.34 \begin {gather*} \begin {cases} \frac {\tilde {\infty } x \tan {\left (c \right )}}{\sec {\left (c \right )}} & \text {for}\: a = 0 \wedge b = 0 \wedge d = 0 \\\frac {x \tan {\left (c \right )}}{a + b \sec {\left (c \right )}} & \text {for}\: d = 0 \\\frac {\log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 a d} & \text {for}\: b = 0 \\- \frac {1}{b d \sec {\left (c + d x \right )}} & \text {for}\: a = 0 \\- \frac {\log {\left (\frac {a}{b} + \sec {\left (c + d x \right )} \right )}}{a d} + \frac {\log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 a d} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 114 vs.
\(2 (35) = 70\).
time = 0.67, size = 114, normalized size = 3.26 \begin {gather*} \frac {\log \left (\frac {{\left | 2 \, b + \frac {2 \, a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {2 \, b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - 2 \, {\left | a \right |} \right |}}{{\left | 2 \, b + \frac {2 \, a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {2 \, b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + 2 \, {\left | a \right |} \right |}}\right )}{d {\left | a \right |}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.47, size = 71, normalized size = 2.03 \begin {gather*} \frac {\mathrm {atan}\left (\frac {a\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{a\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,1{}\mathrm {i}+b\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,1{}\mathrm {i}+b\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,1{}\mathrm {i}}\right )\,2{}\mathrm {i}}{a\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________